package com.itheima.mapper;

import com.itheima.dto.LoginDto;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

@Mapper
public interface MemberMapper {
    @Select("SELECT COALESCE((SELECT id FROM t_member WHERE phoneNumber = #{Telephone}), 0) as id")
    int Find(String telephone);
    @Insert("insert into t_member(phoneNumber) value (#{telephone})")
    void add(LoginDto loginDto);
}
